#include <iostream>
#include <string>

using namespace std;

class Complex
{
private:
    double real;
    double imag;

public:
    Complex()
        : real(0), imag(0)
    {
    }
    Complex(double real, double imag)
        : real(real), imag(imag)
    {
    }
    ~Complex()
    {
    }

public:
    void Show()
    {
        cout << "实部" << real << "虚部" << imag << endl;
    }

public:
    Complex &operator++(void)
    {
        ++this->imag;
        ++this->real;
        return *this;
    }

    friend Complex operator--(Complex &L);

    Complex operator++(int)
    {
        Complex temp = *this;
        ++this->imag;
        ++this->real;
        return temp;
    }

    friend Complex const operator--(Complex &L ,int);
};

Complex operator--(Complex &L)
{
    --L.imag;
    --L.real;
    return L;
}

Complex const operator--(Complex &L, int)
{
    Complex temp = L;
    --L.imag;
    --L.real;
    return temp;
}

int main(int argc, char const *argv[])
{
    Complex F1(10, 10);
    Complex F2;

    F2 = F1--;
    F1.Show();
    F2.Show();

    F2 = F1++;
    F1.Show();
    F2.Show();    
    return 0;
}
